﻿@using CafeOnline.MvcFramework.Grid
@using CafeOnline.MvcFramework.Utils
@using CafeOnline.Common

@{
    ViewBag.Title = "Product Groups";
}

<div class="span12">
    @Html.GetGrid(GridTypeNames.CATEGORY, "category-grid",
    new GridOptions() {
        Caption = "Category Grid",
        Searchable = true,
        ColumnSelector = true,
        Toolbar = true,
        SearchOnEnter = false,
        Pager = true,
        Scroll = false
    })
    <a href="#" id="btnTmp">Reload Please</a>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#btnTmp').on('click', function (e) {
                e.preventDefault();
                
                $('#category-grid').trigger('reloadGrid');
            });
        });
    </script>
</div>
